//**********************************************************************************
//GMCProj32.java
//
//Name: Gabriel Martins	de	Castro
//Class:	COMSC	110L.51
//Date: 10/08/2014
//Instructor: Dr.	Chunyan Bai
//
//Purpose: Proejct 3 Exercise 2 (Calculates the answer for a quadratic equation) 
//***********************************************************************************

import java.util.Scanner;
//Class
public class GMCProj32
{
	public static void main(String[]	args)//main	method
	{
      
      //Step1 prompt the user for the a b and c values
      System.out.println("Enter the values of a b and c : ");
      Scanner input = new Scanner(System.in);
      double  a = input.nextDouble();
      double  b = input.nextDouble();
      double  c = input.nextDouble();
      
      double discriminant = Math.sqrt(Math.pow(b,2) - 4.0*a*c);
      //Step3 Check how many real roots  does it have
      //Step4 print out the grades results
      if(discriminant > 0)
         System.out.println("2 Results : " + ((-b+discriminant)/(2*a)) + "  /  " + ((-b-discriminant)/(2*a)) );
      else
         if(discriminant == 0)
            System.out.println("1 Result : " + (-b/(2*a)));
         else
            System.out.println("The Equation has no real root");
     
   }
}